/**
 * Project:   dtu.fmes.googleloon
 * File:      ImportWind.java
 * License: 
 *            This file is licensed under GNU General Public License version 3
 *            http://www.gnu.org/licenses/gpl-3.0.txt
 *
 * Copyright:	Nicolai Sonne [ NicolaiSonne@hotmail.com.com ]
 * Date:      Dec 11, 2013
 */

package dtu.fmes.loon.model.environment;

/**
 * Wind defined by magnitude and angle
 * 
 * @author Nicolai Sonne
 */
public class ImportWind {

	private Double height = null;

	private Double magnitude = null;

	private Double angle = null;

	public ImportWind(Double height, Double magnitude, Double angle) {
		super();
		this.height = height;
		this.magnitude = magnitude;
		this.angle = angle;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		ImportWind other = (ImportWind) obj;
		if (angle == null) {
			if (other.angle != null) {
				return false;
			}
		} else if (!angle.equals(other.angle)) {
			return false;
		}
		if (height == null) {
			if (other.height != null) {
				return false;
			}
		} else if (!height.equals(other.height)) {
			return false;
		}
		if (magnitude == null) {
			if (other.magnitude != null) {
				return false;
			}
		} else if (!magnitude.equals(other.magnitude)) {
			return false;
		}
		return true;
	}

	public Double getAngle() {
		return angle;
	}

	public Double getHeight() {
		return height;
	}

	public Double getMagnitude() {
		return magnitude;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (angle == null ? 0 : angle.hashCode());
		result = prime * result + (height == null ? 0 : height.hashCode());
		result = prime * result + (magnitude == null ? 0 : magnitude.hashCode());
		return result;
	}

	@Override
	public String toString() {
		return "ImportWind [height=" + height + ", magnitude=" + magnitude + ", angle=" + angle + "]";
	}

}
